package com.dbs.donatebooksystem.Service.impl;

import com.dbs.donatebooksystem.Service.ProductService;
import com.dbs.donatebooksystem.mapper.productMapper;
import com.dbs.donatebooksystem.pojo.product;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private productMapper productMapper;

    public List<product> selectAllProduct(){
        List<product> list=productMapper.selectList(null);
        return list;
    }

    @Override
    public void updateProduct(product product) {
        productMapper.updateById(product);
        return;
    }
}
